#include"processBar.h"

typedef void (*callback_t)(int);

void download(callback_t cb)
{
    
    int total=1000;
    int curr=0;
    while(curr <= total)
    {
        int rate=curr*100/total;
        cb(rate);
        curr+=10;
        usleep(50000);
    }
    printf("\n");
}

int main()
{
    download(process);
    return 0;
}
